<template>
	<div class="factory-view" v-if="admin_type == 1 || is_subsidiary_corporation">
		<el-card class="menu-card">
			<div class="menu-left">
				<tabs-view :list="classifyList" :tabsIndex="type" @roleType="roleType"></tabs-view>
			</div>
		</el-card>
		<factory v-if="type == 0"></factory>
		<factoryExpoList v-if="type == 1"></factoryExpoList>
		<factoryFabric v-if="type == 2"></factoryFabric>
		<factoryVideoList v-if="type == 3"></factoryVideoList>
		<factorySort v-if="type == 4"></factorySort>
	</div>
</template>

<script>
import factory from '@/components/layer-dialog/factory_info.vue';
import factoryExpoList from '../cooperation/factory_expo_list.vue';
import factoryFabric from '../cooperation/factory_fabric.vue';
import factoryVideoList from '../cooperation/factory_video_list.vue';
import factorySort from '../cooperation/factory_sort.vue';
import sonMixin from '@/utils/sonMixin';
import TabsView from '@/components/TabsView'
export default {
	mixins:[sonMixin],
	components: {
		factory,
		factoryExpoList,
		factoryFabric,
		factoryVideoList,
		factorySort,
		TabsView
	},
	data() {
		return {
			type: 0,
			classifyList: ['工厂介绍', '工厂图片', '工厂面料','工厂视频','分类' ],
			admin_type: localStorage.getItem('admin_type'),
			admin_id: localStorage.getItem('admin_id') // admin_id 理员 1是总号，2是商家，3是厂家，4财务，5招商，6产品，7仓管 8收费厂家 9.外部招商员
		};
	},
	methods: {
		roleType(type) {
			this.type = type;
		}
	},
	created() {}
};
</script>

<style lang="scss">
.factory-view {
	width: 100%;
	height: 100%;
	.menu-card {
		margin-bottom: 20px;
	}
	.menu-card .el-card__body {
		padding: 10px 20px;
	}
}
</style>
